s = input()
counter = [{"b": 0, "l": 0, "u": 0, "e": 0} for _ in range(4)]
for i, c in enumerate(s):
    if c not in "blue": continue
    counter[i % 4][c] += 1
maxval = float('inf')
# b 由 0 1 2 3 位置开始

for i in range(4):
    maxval = min(maxval, counter[(0 + i) % 4]['b'])
    maxval = min(maxval, counter[(1 + i) % 4]['l'])
    maxval = min(maxval, counter[(2 + i) % 4]['u'])
    maxval = min(maxval, counter[(3 + i) % 4]['e'])
print(maxval)
